<div class="main-container">
    <div class="main-content">
        <div class="left-panel">
            <ul nz-menu nzMode="inline" class="left-menu">
                <li nz-menu-item
                    *ngFor="let item of planList; let idx = index"
                    [nzSelected]="idx === 0"
                    (click)="getPlanPreviews(item)">
                    {{item.planName}}
                </li>
            </ul>
        </div>

        <div class="right-panel">
            <div class="right-top-box">
                <div class="content-top-bar">
                        <div class="table-btn-group">
                            <button nz-button nzType="primary" (click)="openModal()">新增</button>
                            <button nz-button nzType="primary" (click)="deleteFile()">删除</button>
                        </div>
                </div>

                <div class="right-top-content">
                    <ngx-extended-pdf-viewer [src]="fileSrc" useBrowserLocale="true" height="calc(100vh - 140px)"></ngx-extended-pdf-viewer>
                </div>
            </div>
        </div>
    </div>

    <nz-modal nzClassName="custom-modal pm-modal" nzWidth="760" [(nzVisible)]="modalShow"
              [nzTitle]="modalTitle"
              (nzOnCancel)="onCancel()" (nzOnOk)="onConfirm()">
        <form nz-form [formGroup]="form">
            <div nz-row [nzGutter]="24">
                <div nz-col [nzSpan]="12">
                    <nz-form-item nzFlex>
                        <nz-form-label [nzSpan]="6">预案名称</nz-form-label>
                        <nz-form-control [nzSpan]="16">
                            <input nz-input formControlName="planName" placeholder="预案名称">
                        </nz-form-control>
                    </nz-form-item>
                </div>
                <div nz-col [nzSpan]="22" [nzOffset]="1" style="padding-bottom: 20px;">
                    <nz-upload
                            nzType="drag"
                            nzFileType="application/pdf"
                            [nzMultiple]="false"
                            [(nzFileList)]="fileList"
                            (nzChange)="handleChange($event)"
                            [nzAction]="uploadUrl"
                    >
                        <p class="ant-upload-drag-icon">
                            <i nz-icon nzType="inbox"></i>
                        </p>
                        <p class="ant-upload-text">点击或者拖拽文件到此处上传</p>
                    </nz-upload>
                </div>
            </div>
        </form>
    </nz-modal>
</div>
